package com.lanmao.blog.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import com.lanmao.blog.vo.BlogTags;
import com.lanmao.blog.entity.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lanmao.blog.entity.Count;
import com.lanmao.blog.vo.FristBlog;
import com.lanmao.blog.vo.HotBlog;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lanmao
 * @since 2022-03-13
 */
public interface BlogService extends IService<Blog> {
    Page<Blog> pageBlogs(Long current, Long limit, Boolean published, String flag, Boolean share_statement, Boolean is_delete);

    List<Blog> getByTitle(String title);

    HashMap<String, Object> prefindByPage(Long current, Long size, Long type_id, Long tags_id);

    List<HotBlog> prefindHotBlog();

    boolean saveBT(BlogTags params);

    boolean temporarySave(BlogTags params);

    boolean updateBlog(BlogTags params);

    boolean logicDeleteBlog(String id);

    boolean deleteBT(String id);

    boolean recoveryBlog(String id);

    Blog getByBlogId(String id);

    Count countBlog();


    List<FristBlog> vuegetByTitle(String title);

    void updateByComment(Blog blog);

    HashMap<String, Object> vuefindByTag(Long current, Long size, Long type_id, Long tags_id);
}
